/**
 * @author liuxin
 * @e-mail lxtobe5@gmail.com
 * @update 2011.12.25
 */
package com.lx.display.type
{
	import com.lx.display.Graph;

	public class RoundRectangle extends Graph
	{
		/**
		 * Draws a rounded rectangle. 
		 * @param width         The width of the round rectangle (in pixels).
		 * @param height        The height of the round rectangle (in pixels).
		 * @param ellipseWidth  The width of the ellipse used to draw the rounded corners (in pixels).
		 * @param ellipseHeight The height of the ellipse used to draw the rounded corners (in pixels). 
		 */		
		public function draw(width:Number, height:Number, ellipseWidth:Number, ellipseHeight:Number = NaN):void
		{
			$displayObject.graphics.drawRoundRect(0,0,width,height,ellipseWidth,ellipseHeight);
			$displayObject.graphics.endFill();
		}
	}
}